package javabase.schoolwork.day6_6;

/**
 * @author fance
 * @date 18-6-6 下午3:21
 */
class InfoIII<T extends Number> {
    private T var;


    public T getVar() {
        return var;
    }

    public void setVar(T var) {
        this.var = var;
    }

    @Override
    public String toString() {
        return "InfoIII{" +
                "var=" + var +
                '}';
    }
}
public class GenDemo9 {
    public static void main(String[] args) {
        System.out.println(fun(30).getVar());
    }
    public static <T extends Number> InfoIII<T> fun(T param) {
        InfoIII<T> tmp = new InfoIII<T>();
        tmp.setVar(param);
        return tmp;
    }
}
